<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <script src="../XPage.js"></script>
<style rel="stylesheet" type="text/css">
.x-page {
    font-size: 14px;
}

/* item */
.x-page a,
.x-page span {
    display: inline-block;
    height: 32px;
    line-height: 32px;
    padding: 0 14px;
    margin-left: 5px;
    color: #222;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.x-page a:hover {
    color: #fff;
    background-color: #00a1d6;
    text-decoration: none;
}

/* current */
.x-page span {
    color: #fff;
    cursor: default;
    border-color: #00a1d6;
    background-color: #00a1d6;
}

/* jump */
.x-page div {
    font-size: 12px;
    float: right;
    color: #666;
    line-height: 36px;
}
.x-page div input {
    margin: 0 5px;
    padding: 0 5px;
    height: 24px;
    line-height: 24px;
    font-size: 12px;
    width: 40px;
    text-align: center;
    outline: none;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.x-page div input:focus {
    border-color: #00a1d6;
}
</style>
</head>
<body>
<div id="container" style="padding: 10px 0"></div>

<script>
var page = new XPage(1000, 10);
page.setConfigs({
    className: 'x-page',
    linkItemNumber: 7,
        
    showHome: false,
    showPrevious: true,
    showItem: true,
    showNext: true,
    showLast: false,
    showJump: true
});
page.render(document.getElementById('container'));

page.onChange = function(currentPage, e) {
    console.log(currentPage);
    page.render(document.getElementById('container'));
};
</script>
</body>
</html>